<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="/js/手写系列/防抖/index.js"></script>
</head>
<body>
<button id="btn">
    提交
</button>
<script>
    let btn = document.getElementById('btn')
    btn.addEventListener('click',debounce(a,1000))
    function a(e) { 
        console.log(e);
        console.log(this);
            console.log('提交成功');
    }
</script>
</body>
</html>